﻿namespace Shop.Model.View.Order
{
    /// <summary>
    /// 订单详情
    /// </summary>
    public class OrderDetailVo
    {
        /// <summary>
        /// 订单ID
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 订单Code
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 收货人姓名
        /// </summary>
        public string ConsigneeName { get; set; }

        /// <summary>
        /// 收货人电话
        /// </summary>
        public string ConsigneePhone { get; set; }

        /// <summary>
        /// 收货省
        /// </summary>
        public string ConsigneeProvince { get; set; }

        /// <summary>
        /// 收货市
        /// </summary>
        public string ConsigneeCity { get; set; }

        /// <summary>
        /// 收货区县
        /// </summary>
        public string ConsigneeDistrict { get; set; }

        /// <summary>
        /// 乡/镇
        /// </summary>
        public string ConsigneeTown { get; set; }

        /// <summary>
        /// 收货地址
        /// </summary>
        public string ConsigneeAddress { get; set; }

        /// <summary>
        /// 商品总价
        /// </summary>
        public decimal GoodsAmount { get; set; }

        /// <summary>
        /// 优惠金额
        /// </summary>
        public decimal DiscountAmount { get; set; }

        /// <summary>
        /// 物流费用
        /// </summary>
        public decimal LogisticsFee { get; set; }

        /// <summary>
        /// 实际支付
        /// </summary>
        public decimal OrderAmount { get; set; }

        /// <summary>
        /// 订单状态  -1：取消，1：待付款，2:待发货，3：待收货，4:已完成, 5:已评价
        /// </summary>
        public int OrderStatus { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 订单商品
        /// </summary>
        public List<OrderGoodsDetailVo> OrderItem { get; set; }

        /// <summary>
        /// 物流信息
        /// </summary>
        public List<DeliveryVo> Deliveries { get; set; }
    }

    /// <summary>
    /// 订单商品
    /// </summary>
    public class OrderGoodsDetailVo
    {
        /// <summary>
        /// 订单商品记录ID
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 商品ID
        /// </summary>
        public long GoodsId { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        public string GoodsName { get; set; }

        /// <summary>
        /// 商品规格
        /// </summary>
        public long GoodsSpecId { get; set; }

        /// <summary>
        /// 规格名称
        /// </summary>
        public string GoodsSpecName { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public int GoodsQuantity { get; set; }

        /// <summary>
        /// 商品价格
        /// </summary>
        public decimal GoodsPrice { get; set; }

        /// <summary>
        /// 商品图片
        /// </summary>
        public string GoodsImage { get; set; }

        /// <summary>
        /// 是否是赠品
        /// </summary>
        public bool IsGift { get; set; }
    }

    public class DeliveryVo
    {
        /// <summary>
        /// 物流公司
        /// </summary>
        public string LogisticsCompany { get; set; }

        /// <summary>
        /// 物流单号
        /// </summary>
        public string LogisticsNo { get; set; }

        /// <summary>
        /// 发货时间
        /// </summary>
        public DateTime SendTime { get; set; }
    }
}
